package kr.saeildadim.androidexam_saeildamil.chapter13;

import kr.saeildadim.androidexam_saeildamil.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;

public class Ch13_Seekbar extends Activity {
	SeekBar mSeekBar;
	TextView mVoluem;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
	
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch13_seekbar);
	
		mSeekBar = (SeekBar) findViewById(R.id.ch13_seekbar_seekbar);
		mVoluem= (TextView) findViewById(R.id.ch13_seekbar_text);
		
		mSeekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
			
			@Override
			public void onStopTrackingTouch(SeekBar seekBar) {}
			
			@Override
			public void onStartTrackingTouch(SeekBar seekBar) {}
			
			@Override
			public void onProgressChanged(SeekBar seekBar, int progress,
					boolean fromUser) {
				mVoluem.setText("Now Volume"+progress);
				
			}
		});
		
		
	}
	
	

}
